package com.tensquare.eureka.rabbitmq;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component//放容器中
@RabbitListener(queues = "itheima")//消费者监听器,指定要消费的对象
public class Customer2 {
    @RabbitHandler
    public void getMsg(Object msg){
        System.out.println("itheima"+msg);
    }
}
